/*
 *  GameManager.h
 *  QuickGUITest
 *
 *  Created by Jason Townes French on 4/30/08.
 *
 */

#ifndef __GAMEMANAGER_H__
#define __GAMEMANAGER_H__

//STL Libraries
#include <vector>

//Ogre Libraries
#include <OIS/OIS.h>
#include <Ogre.h>
#include <OgreFrameListener.h>

//Game Libraries

using namespace Ogre;

//forward declaration for GameApplication
class GameApplication;
class GameState;

class GameManager : public Ogre::Singleton<GameManager>
{
	public:
		GameManager();
		virtual ~GameManager();
		
		void start(GameState* s);
		void changeState(GameState* s);
		void pushState(GameState* s);
		void popState();
		void setupResources();
		void setResourcePath(std::string path);
		
		
		static GameManager& getSingleton();
		RenderWindow* getWindow();
		
	private:
		std::vector<GameState*>* mStates;
		bool mExitGame;
		
	protected:
		bool configure();
		
		Root* mRoot;
		std::string mResourcePath;
		
		/*
		Not sure if I need these yet:
		
		void keyClicked(KeyEvent* e);
		void keyPressed(KeyEvent* e);
		void keyReleased(KeyEvent* e);
		
		bool frameStarted(const FrameEvent& evt);
		bool frameEnded(const FrameEvent& evt);
		*/
};

#endif